Create your own quarto doc

TUD

Sarah Zeller

Artwork by Allison Horst

What’s in a Quarto documentation?

  • Documentation (markdown text)
  • Code
  • Graphs
  • (Tables)

Documentation

Artwork by Allison Horst

Credits

  • Describing data sources
  • Citing used packages
grateful::cite_packages(output = "table", out.dir = ".") |> 
  kableExtra::kable()

grateful::cite_packages(output = "paragraph", out.dir = ".")

Thought processes

  • Describe why you change your data: like commenting
  • Describe your results: How can this graph be interpreted?
  • What are limitations?

Code

Code Chunks

```{r}
#| label: example-code-chunk
#| output: true
#| warning: false
#| code-line-numbers: true

library(tidyverse)
library(palmerpenguins)
data(penguins)
subset <- penguins |> filter(island == "Dream")
```

Inline code

When you want to use results from a code chunk directly in the text, you can use this syntax:

`​ r 1+1`

Graphs

Artwork by Allison Horst

Theme options

penguins |> 
  ggplot() +
  geom_point(aes(x = bill_length_mm, y = bill_depth_mm, col = species)) +
  theme_classic()

Labs

penguins |> 
  ggplot() +
  geom_point(aes(x = bill_length_mm, y = bill_depth_mm, col = species)) +
  theme_classic() +
  labs(x = "Bill length (mm)",
       y = "Bill depth (mm)",
       col = "Species",
       title = "Penguin bills",
       caption = "Data source: {palmerpenguins}")